/*
 * @Author: rogi
 * @Date: 2022-07-18 15:47:08
 * @LastEditTime: 2022-10-28 16:02:37
 * @LastEditors: rogi
 * @Description: 描述
 */
import request from "../utils/request";

export function permissionList(params) {
  return request(`/jeecg-boot/sys/permission/list`, {
    params
  })
}

export function queryTreeList(params) {
  return request(`/jeecg-boot/sys/permission/queryTreeList`, {
    params
  })
}

export function categoryRootList(params) {
  return request(`/jeecg-boot/sys/category/rootList`, {
    params
  })
}

export function categoryChildList(params) {
  return request(`/jeecg-boot/sys/category/childList`, {
    params
  })
}

export function dictLoadTreeData(params) {
  return request(`/jeecg-boot/sys/dict/loadTreeData`, {
    params
  })
}

export function roleList(params) {
  return request(`/jeecg-boot/sys/role/list`, {
    params
  })
}

export function userUserRoleList(params) {
  return request(`/jeecg-boot/sys/user/userRoleList`, {
    params
  })
}

export function duplicateCheck(params) {
  return request(`/jeecg-boot/sys/duplicate/check`, {
    params
  })
}

export function permissionAdd(body) {
  return request(`/jeecg-boot/sys/permission/add`, {
    method: 'post',
    body
  })
}

export function categoryAdd(body) {
  return request(`/jeecg-boot/sys/category/add`, {
    method: 'post',
    body
  })
}

export function roleAdd(body) {
  return request(`/jeecg-boot/sys/role/add`, {
    method: 'post',
    body
  })
}

export function permissionEdit(body) {
  return request(`/jeecg-boot/sys/permission/edit`, {
    method: 'post',
    body
  })
}

export function deleteItem(params) {
  return request(`/jeecg-boot/sys/permission/delete`, {
    method: 'delete',
    params
  })
}

export function deleteBatch(params) {
  return request(`/jeecg-boot/sys/permission/deleteBatch`, {
    method: 'delete',
    params
  })
}

export function roleDelete(params) {
  return request(`/jeecg-boot/sys/role/delete`, {
    method: 'delete',
    params
  })
}

export function timingTaskList(params) {
  return request(`/jeecg-boot/sys/quartzJob/list`, {
    params
  })
}

export function positionList(params) {
  return request(`/jeecg-boot/sys/position/list`, {
    params
  })
}

export function sysDepartQueryTreeList(params) {
  return request(`/jeecg-boot/sys/sysDepart/queryTreeList`, {
    params
  })
}

export function editTimingTask(body) {
  return request(`/jeecg-boot/sys/quartzJob/edit`, {
    method: 'put',
    body
  })
}

export function roleEdit(body) {
  return request(`/jeecg-boot/sys/role/edit`, {
    method: 'put',
    body
  })
}

export function userEdit(body) {
  return request(`/jeecg-boot/sys/user/edit`, {
    method: 'put',
    body
  })
}

export function addTimingTask(body) {
  return request(`/jeecg-boot/sys/quartzJob/add`, {
    method: 'post',
    body
  })
}

export function userAdd(body) {
  return request(`/jeecg-boot/sys/user/add`, {
    method: 'post',
    body
  })
}

export function pauseTimingTask(params) {
  return request(`/jeecg-boot/sys/quartzJob/pause`, {
    params
  })
}


export function startTimingTask(params) {
  return request(`/jeecg-boot/sys/quartzJob/resume`, {
    params
  })
}

export function executeTimingTask(params) {
  return request(`/jeecg-boot/sys/quartzJob/execute`, {
    params
  })
}


export function deleteTimingTask(params) {
  return request(`/jeecg-boot/sys/permission/delete`, {
    method: 'delete',
    params
  })
}


export function getSystemUserList(params) {
  return request(`/jeecgboot/sys/user/list`, {
    params
  })
}
